﻿using System;
using System.ComponentModel;
using System.Runtime.InteropServices;

namespace Teigha.Core
{
	public class OdGiImageBackgroundTraitsData : OdGiBackgroundTraitsData
	{
		[EditorBrowsable(EditorBrowsableState.Never)]
		public OdGiImageBackgroundTraitsData(IntPtr cPtr, bool cMemoryOwn) : base(GlobalsPINVOKE.OdGiImageBackgroundTraitsData_SWIGUpcast(cPtr), cMemoryOwn)
		{
			this.swigCPtr = new HandleRef(this, cPtr);
		}

		[EditorBrowsable(EditorBrowsableState.Never)]
		public static HandleRef getCPtr(OdGiImageBackgroundTraitsData obj)
		{
			if (obj != null)
			{
				return obj.swigCPtr;
			}
			return new HandleRef(null, IntPtr.Zero);
		}

		~OdGiImageBackgroundTraitsData()
		{
			this.Dispose();
		}

		public override void Dispose()
		{
			if (this.swigCPtr.Handle != IntPtr.Zero)
			{
				if (this.swigCMemOwn)
				{
					lock (this.locker)
					{
						if (this.swigCPtr.Handle != IntPtr.Zero && this.swigCMemOwn)
						{
							this.swigCMemOwn = false;
							GlobalsPINVOKE.delete_OdGiImageBackgroundTraitsData(this.swigCPtr);
						}
					}
					this.swigCMemOwn = false;
				}
				this.swigCPtr = new HandleRef(null, IntPtr.Zero);
			}
			GC.SuppressFinalize(this);
			base.Dispose();
		}

		public OdGiImageBackgroundTraitsData() : this(GlobalsPINVOKE.new_OdGiImageBackgroundTraitsData(), true)
		{
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public string imageFilename()
		{
			string result = GlobalsPINVOKE.OdGiImageBackgroundTraitsData_imageFilename(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setImageFilename(string filename)
		{
			GlobalsPINVOKE.OdGiImageBackgroundTraitsData_setImageFilename(this.swigCPtr, filename);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public bool fitToScreen()
		{
			bool result = GlobalsPINVOKE.OdGiImageBackgroundTraitsData_fitToScreen(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public bool maintainAspectRatio()
		{
			bool result = GlobalsPINVOKE.OdGiImageBackgroundTraitsData_maintainAspectRatio(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public bool useTiling()
		{
			bool result = GlobalsPINVOKE.OdGiImageBackgroundTraitsData_useTiling(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setFitToScreen(bool flag)
		{
			GlobalsPINVOKE.OdGiImageBackgroundTraitsData_setFitToScreen(this.swigCPtr, flag);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public void setMaintainAspectRatio(bool flag)
		{
			GlobalsPINVOKE.OdGiImageBackgroundTraitsData_setMaintainAspectRatio(this.swigCPtr, flag);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public void setUseTiling(bool flag)
		{
			GlobalsPINVOKE.OdGiImageBackgroundTraitsData_setUseTiling(this.swigCPtr, flag);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public void setOffset(double x, double y)
		{
			GlobalsPINVOKE.OdGiImageBackgroundTraitsData_setOffset(this.swigCPtr, x, y);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public double xOffset()
		{
			double result = GlobalsPINVOKE.OdGiImageBackgroundTraitsData_xOffset(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public double yOffset()
		{
			double result = GlobalsPINVOKE.OdGiImageBackgroundTraitsData_yOffset(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setXOffset(double xOffset)
		{
			GlobalsPINVOKE.OdGiImageBackgroundTraitsData_setXOffset(this.swigCPtr, xOffset);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public void setYOffset(double yOffset)
		{
			GlobalsPINVOKE.OdGiImageBackgroundTraitsData_setYOffset(this.swigCPtr, yOffset);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public void setScale(double x, double y)
		{
			GlobalsPINVOKE.OdGiImageBackgroundTraitsData_setScale(this.swigCPtr, x, y);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public double xScale()
		{
			double result = GlobalsPINVOKE.OdGiImageBackgroundTraitsData_xScale(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public double yScale()
		{
			double result = GlobalsPINVOKE.OdGiImageBackgroundTraitsData_yScale(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setXScale(double xScale)
		{
			GlobalsPINVOKE.OdGiImageBackgroundTraitsData_setXScale(this.swigCPtr, xScale);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public void setYScale(double yScale)
		{
			GlobalsPINVOKE.OdGiImageBackgroundTraitsData_setYScale(this.swigCPtr, yScale);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public bool IsEqual(OdGiImageBackgroundTraitsData data2)
		{
			bool result = GlobalsPINVOKE.OdGiImageBackgroundTraitsData_IsEqual(this.swigCPtr, OdGiImageBackgroundTraitsData.getCPtr(data2));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public bool IsNotEqual(OdGiImageBackgroundTraitsData data2)
		{
			bool result = GlobalsPINVOKE.OdGiImageBackgroundTraitsData_IsNotEqual(this.swigCPtr, OdGiImageBackgroundTraitsData.getCPtr(data2));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		private object locker = new object();

		private HandleRef swigCPtr;
	}
}
